SQL: Advanced Level SQL From The Ground Up (DIY SQL Book 3) by Keith Dvorjak

SQL: Advanced Level SQL From The Ground Up (DIY SQL Book 3) by Keith Dvorjak

Author:Keith Dvorjak [Dvorjak, Keith]
Language: eng
Format: epub
Published: 2018-07-05T23:00:00+00:00


1 row in set (0.08 sec)

The value ‘SYSTEM’ in the result set indicates that the server is making use of the time zone set on the server. Sitting in any part of the world you start a session across the network to a MySQL server located in any other location all that you need to do is change the time zone setting for your session.

SET time_zone='+00:00';

Query OK, 0 rows affected (0.02 sec)

Temporal data can be created by copying data from existing date, datetime or time column, by calling an inbuilt function that returns a date, time or datetime or by representing temporal data in a string and then letting the server evaluate it.

SELECT @@session.time_zone;

+ - - - - - - - - - - - - - - - - - - +

| @@session.time_zone |

+ - - - - - - - - - - - - - - - - - - +

| +00:00 |

+ - - - - - - - - - - - - - - - - - - +

1 row in set (0.00 sec)

How to work with string representations of temporal data

Date formats are defined as following in MySQL:

YYYY stands for year and valid values can be anywhere between 1000 to 9999.

MM stands for month and valid value can be anywhere between 01 to 12.

DD stands for day and can be anywhere between 01 ton 31.

HH stands for hour and the valid value can be anywhere between 00 to 23.

HHH stands for hours elapsed and the value can be anywhere between -838 to 838.

MI stands for minute and can have any value between 00 to 59.

SS stands for second and can have any value between 00 to 59.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.